package com.zzyl.nursing.service;

import java.util.List;
import java.util.Map;

import com.zzyl.common.core.page.PageDomain;
import com.zzyl.nursing.domain.FamilyMemberElder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzyl.nursing.dto.DeviceDataMapDto;
import com.zzyl.nursing.dto.DeviceDto;
import com.zzyl.nursing.dto.UserAddRequestDto;
import com.zzyl.nursing.vo.MemberElderVo;
import com.zzyl.nursing.vo.member.PropertyStatusInfoVo;

/**
 * 客户老人关联Service接口
 * 
 * @author ruoyi
 * @date 2024-09-28
 */
public interface IFamilyMemberElderService extends IService<FamilyMemberElder>
{
    /**
     * 查询客户老人关联
     * 
     * @param id 客户老人关联主键
     * @return 客户老人关联
     */
    public FamilyMemberElder selectFamilyMemberElderById(Long id);

    /**
     * 查询客户老人关联列表
     * 
     * @param familyMemberElder 客户老人关联
     * @return 客户老人关联集合
     */
    public List<FamilyMemberElder> selectFamilyMemberElderList(FamilyMemberElder familyMemberElder);

    /**
     * 新增客户老人关联
     * 
     * @param familyMemberElder 客户老人关联
     * @return 结果
     */
    public int insertFamilyMemberElder(FamilyMemberElder familyMemberElder);

    /**
     * 修改客户老人关联
     * 
     * @param familyMemberElder 客户老人关联
     * @return 结果
     */
    public int updateFamilyMemberElder(FamilyMemberElder familyMemberElder);

    /**
     * 批量删除客户老人关联
     * 
     * @param ids 需要删除的客户老人关联主键集合
     * @return 结果
     */
    public int deleteFamilyMemberElderByIds(Long[] ids);

    /**
     * 删除客户老人关联信息
     * 
     * @param id 客户老人关联主键
     * @return 结果
     */
    public int deleteFamilyMemberElderById(Long id);

    /**
     * 绑定老人
     * @param dto
     * @return
     */
    void add(UserAddRequestDto dto);

    /**
     * 查询家人列表
     * @param pageDomain
     * @return
     */
    List<MemberElderVo> queryFamilies(PageDomain pageDomain);

    /**
     * 查询家人健康数据
     * @param dto
     * @return
     */
    Map<String, PropertyStatusInfoVo> QueryDevicePropertyStatus(DeviceDto dto);

    /**
     * 1.5  按天统计查询指标数据
     * @param dto
     * @return
     */
    List<Map<String, Object>> queryDeviceDataListByDay(DeviceDataMapDto dto);

    /**
     * 1.6  按周统计查询指标数据
     * @param dto
     * @return
     */
    List<Map<String, Object>> queryDeviceDataListByWeek(DeviceDataMapDto dto);
}
